package 设计模式.状态设计模式;

import java.util.Date;

public class Order {
    private Long sno;
    private Long goodId;

    OrderStateEnum state;

    public Order() {
        state=OrderStateEnum.UNPAY;
    }
    public void nextState(){
        state.nextState(this);
    }

    public Long getSno() {
        return sno;
    }

    public void setSno(Long sno) {
        this.sno = sno;
    }

    public Long getGoodId() {
        return goodId;
    }

    public void setGoodId(Long goodId) {
        this.goodId = goodId;
    }

    public OrderStateEnum getState() {
        return state;
    }

    public void setState(OrderStateEnum state) {
        this.state = state;
    }
}
